-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: move inflation_history to economic data #370
Conversation
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
lectures/inflation_history.md
Outdated
|
||
Each governent stoppped printing money to pay for goods and services once again made its currency convertible to the US dollar or the UK pound, thereby vitually to gold. | ||
Each government stopped printing money to pay for goods and services once again which made its currency convertible to the US dollar or the UK pound. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jstac this is perhaps the most controversial edit re: gold comment. Should we keep thereby vitally to gold
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mmcky . I think your sentence is good but please change "which" to "and".
lectures/inflation_history.md
Outdated
|
||
```{code-cell} ipython3 | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
plt.matplotlib.rcParams['figure.figsize'] = (12,8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not set to a standard value in the config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this matplotlib
config needs to be initialised each time matplotlib
is imported. We could add a global scale
to the general config but that doesn't ensure the png
files are high enough quality in all cases. Tricky one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW - we could look at using https://matplotlib.org/1.3.1/users/customizing.html and maintain a config file as it isn't essential for rendering in the notebook (just displaying on the website). This will add a bit of complexity around deployment though as it would need to be "installed"
lectures/inflation_history.md
Outdated
|
||
As usual, we'll start by importing some Python modules. | ||
We then import the Python modules we need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think our convention is to have all imports and installs at the top. Shall we move this and the previous cell up and modify the text?
``` | ||
|
||
Now we write plotting functions so we can plot the price level, exchange rates, | ||
and inflation rates, for each country of interest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good practice for us to name the funtions that will be hidden, and say roughly what they do, so readers who don't want to open the cell can still understand the code that follows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add to manual.quantecon.org
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
For each country, the second graph plots a three-month moving average of the inflation rate defined as $p_t - p_{t-1}$. | ||
For each country, the second graph plots a centered three-month moving average of the inflation rate defined as $\frac{p_{t-1} + p_t + p_{t+1}}{3}$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a moving average of prices or of the inflation rate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inflation rate -- as the ma
code is part of pr_plot
or Plots for inflation rates
lectures/inflation_history.md
Outdated
plt.show() | ||
``` | ||
|
||
## Starting and Stopping Big Inflations | ||
|
||
It is striking how **quickly** (log) price levels in Austria, Hungary, Poland, | ||
and Germany leveled off after rising so quickly. | ||
It is striking how **quickly** (log) price levels in Austria, Hungary, Poland, and Germany leveled off after rising so quickly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bold is for defintions and italics is for emphasis: https://manual.quantecon.org/styleguide/writing.html#emphasis-and-definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will change to *
Thanks @mmcky , great changes! I've flagged some small issues above. Also, could you please bring the headings and axis labels in line with the manual? Would you mind to get rid of all Suggestion: "The graph shows..." -> "Figure xx shows..." |
Thanks @jstac
Ah I went the other way and added it to all (in an effort to minimise lines) 😄 -- but I will remove the ax.spines code so there is a box around every figure. |
Totally reasonable -- I like minimal -- but some of the figs have axis numbers on the right, so they end up being three sided, which looks a bit odd. I think it's nice if every figure has a uniform style, and we can achieve this with boxes... |
Great. I updated this type of text to |
thanks @jstac I think all |
@mmcky please feel free to merge when you've made those last changes. If it doesn't mess up the figures, perhaps we should also get rid of I think the lectures are smoother for readers if they don't hit messy commands at the very start of the lecture. With figure sizes, let's strongly encourage people to stick with defaults unless they have a good reason not to --- and consider changing the defaults if we often need to deviate... |
@jstac I have updated figures to
|
This PR moves the
inflation_history
lecture up to section onEconomic Data
This PR also reviews
inflation_history
and makes the following adjustmentscentered=True
so you uset-1
,t
, andt+1
in the calculation